package Lamada;

import java.util.Arrays;

public class Test4 {
    public static void main(String[] args) {
        String[] name={"John","Mary","Tom","David","Jane","Lisa"};
        Arrays.sort(name,(o1,o2)->{
            return o1.compareToIgnoreCase(o2);//比较忽略大小写
        });
        Arrays.sort(name,String::compareToIgnoreCase);
    }
}
